﻿/* *************************************************
 *  Copyright © FlexDev 2010. All rights reserved.
 *  Author: Rodrigo da Silva Brito
 *  Date: 07/16/2010
 *  Contact: mailto:rodrigosilvabrito@hotmail.com
 *  Site: http://www.flexdev.com.br
 * *************************************************
*/
using System;
using System.IdentityModel.Selectors;
using System.IdentityModel.Tokens;

namespace Flexdev.Wcf.Extensions.ServerSample
{
    public class UserValidator : UserNamePasswordValidator
    {
        public override void Validate(string userName, string password)
        {
            if (userName != "rodrigo")
                throw new SecurityTokenValidationException("Invalid user!");
        }
    }    
}